package mebp.genetic.recombination;

import java.util.Vector;

import mebp.genetic.Individuum;

public class CrossoverRotation implements RecombinationStrategy {

	MinimumCrossover mincross = null;
	TwoPointCrossover twocross = null;
	
	public CrossoverRotation() {
		this.mincross = new MinimumCrossover();
		this.twocross = new TwoPointCrossover();
	}
	
	@Override
	public Vector<Individuum> recombine(Individuum... parents) {
		if (Math.random()<0.4) {
			return mincross.recombine(parents);
		} 
		return twocross.recombine(parents);
	}

}
